package com.jianbing.north.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jianbing.north.mapper.NorthDayPlanMapper;
import com.jianbing.north.domain.NorthDayPlan;
import com.jianbing.north.service.INorthDayPlanService;

/**
 * 每天能够解锁的partService业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-20
 */
@Service
public class NorthDayPlanServiceImpl implements INorthDayPlanService 
{
    @Autowired
    private NorthDayPlanMapper northDayPlanMapper;

    /**
     * 查询每天能够解锁的part
     * 
     * @param id 每天能够解锁的part主键
     * @return 每天能够解锁的part
     */
    @Override
    public NorthDayPlan selectNorthDayPlanById(Long id)
    {
        return northDayPlanMapper.selectNorthDayPlanById(id);
    }

    /**
     * 查询每天能够解锁的part列表
     * 
     * @param northDayPlan 每天能够解锁的part
     * @return 每天能够解锁的part
     */
    @Override
    public List<NorthDayPlan> selectNorthDayPlanList(NorthDayPlan northDayPlan)
    {
        return northDayPlanMapper.selectNorthDayPlanList(northDayPlan);
    }

    /**
     * 新增每天能够解锁的part
     * 
     * @param northDayPlan 每天能够解锁的part
     * @return 结果
     */
    @Override
    public int insertNorthDayPlan(NorthDayPlan northDayPlan)
    {
        return northDayPlanMapper.insertNorthDayPlan(northDayPlan);
    }

    /**
     * 修改每天能够解锁的part
     * 
     * @param northDayPlan 每天能够解锁的part
     * @return 结果
     */
    @Override
    public int updateNorthDayPlan(NorthDayPlan northDayPlan)
    {
        return northDayPlanMapper.updateNorthDayPlan(northDayPlan);
    }

    /**
     * 批量删除每天能够解锁的part
     * 
     * @param ids 需要删除的每天能够解锁的part主键
     * @return 结果
     */
    @Override
    public int deleteNorthDayPlanByIds(Long[] ids)
    {
        return northDayPlanMapper.deleteNorthDayPlanByIds(ids);
    }

    /**
     * 删除每天能够解锁的part信息
     * 
     * @param id 每天能够解锁的part主键
     * @return 结果
     */
    @Override
    public int deleteNorthDayPlanById(Long id)
    {
        return northDayPlanMapper.deleteNorthDayPlanById(id);
    }

    public int selectMaxDay(){
        return northDayPlanMapper.getMaxDay();
    }
}
